# 
# Created by francklinson on 2021/7/29 AT 23:40.
#
from typing import List


class Solution:
    def swapNumbers(self, numbers: List[int]) -> List[int]:
        # 根据异或性质进行
        numbers[0] = numbers[0] ^ numbers[1]
        numbers[1] = numbers[0] ^ numbers[1]
        numbers[0] = numbers[0] ^ numbers[1]
        return numbers


if __name__ == '__main__':
    sol = Solution()
    nums = [1, 2]
    print(sol.swapNumbers(nums))
